<layout name="Swiper/list_layout" />
<div class="page-header">

  <h2><span class="glyphicon glyphicon-list-alt glyphicon-head" aria-hidden="true"></span>banner管理 <small class="pull-right"><a href="" ng-click="changeRoute('/swiper/add')" ><span class="glyphicon glyphicon-plus-sign glyphicon-head" aria-hidden="true"></span>添加banner</a></small></h2>
  
</div>

  <div class="table-responsive" ng-controller="SwiperIndexCtrl">
	<!-- 在表格中标记collection -->
	<!-- 在table标签上注明循环变量line，默认为"line" -->
	<!-- table table-bordered table-striped table-hover table-condensed -->
	<table class="table table-striped table-hover" collection="swiper" line="swiper" >
	  <thead>
		<tr>
		<td colspan="8" class="text-right">
			<include file="Public/swiper-searchbar" />
		</td>	
		</tr>
		
	
		
		<tr>
		<th>#</th>
		<th>ID</th>
		<th>文章ID</th>
		<th><include file="Public/th-swiper-title" /></th><!-- 文章标题带气泡 -->
		<th>封面图</th>
		<th>发布日期</th>
		<th><include file="Public/th-post-star" /></th><!-- 文章置顶星级 -->
		<th>
		<span data-toggle="tooltip" title="隐藏：文章不会被移入回收站，只是不在前端显示。<br /> 删除：文章被移入回收站，且不在前端显示">操作 <i class="fa fa-comment-o" style="color:red"></i></span>
		</th>
		</tr>
	  </thead>
	  <tfoot>
		<td colspan="8">

			<a ng-href="" class="btn btn-default btn-sm active" role="button" ng-model="allChecked" ng-click="allChecked=!allChecked" style="display:block;float:left;">全选</a>
			<include file="Public/swiper-checked-handler-icon" />
			<select class="form-control" ng-model="transfer_cat" ng-change="transferCategory(transfer_cat)" ng-show="showTransferCate" style="width:auto;height:30px;float:left;">
				<option value="" selected>--选择分类--</option>
				<option ng-repeat="item in cates" value="{{item.cat_id}}" ng-class="item.level|levelClass">{{'&nbsp;&nbsp;&nbsp;'|levelRepeat:item.level}}{{item.cat_name}}</option>
			</select>			
			
			<div style="float:right;"><!-- 分页列表 -->		
			<include  file="Public/pagelist" />	
			</div>
		
		
		</td>
	  </tfoot>
	  <tbody>
		<!-- 为了兼容ng与浏览器，_id取名mgid -->
		<!-- 每行在tr标签上标记_id值 -->
		<tr ng-repeat="swiper in data | filter: search" ng-show="swiper" mgid="{{swiper._id}}">
		  <td style="width:10px;"><input type="checkbox" ng-checked="allChecked"></td>
		  <td>{{swiper._id}}</td>
		  <td><span ng-show="swiper.post_id>0">{{swiper.post_id}}</span></td>
		  <td><span load-by-id="content">{{swiper.swiper_title}}</span></td>
		  <td>
			<include file="Public/swiper-cover-file" /><!-- cover_file -->
		  </td>
		  <td>
			{{swiper.add_time}}
		  </td>
		  <td>
			<div post-star="{{swiper.is_top}}"></div>
		  </td>
		  <td> 
			<include file="Public/swiper-handler-icon" />

		  </td>
		</tr>
	  </tbody>
	</table>
  </div>